package com.anne.fish.dao.hibernate;

import java.util.List;

import com.anne.fish.model.Cat;
import com.anne.fish.dao.CatDao;
import com.anne.fish.dao.hibernate.GenericDaoHibernate;
import org.springframework.stereotype.Repository;

@Repository("catDao")
public class CatDaoHibernate extends GenericDaoHibernate<Cat, Long> implements CatDao {

    public CatDaoHibernate() {
        super(Cat.class);
    }

	public List<Cat> findByFatherId(Long pid) {
 		return this.getHibernateTemplate().find("from Cat where parentId=?", pid);
	}
}
